/**
 * 
 */
package ar.edu.unq.tpi.uis.tepe3.dominio;

import java.util.List;

import org.omg.CORBA.UserException;

/**
 * @author daniel
 *
 */
public class Group extends Grantable {

	private List<User> users;
	/**
	 * 
	 * daniel
	 * 11/05/2011
	 * @throws UserException 
	 */
	@SuppressWarnings("serial")
	public Group() throws UserException {
		throw new UserException("no puede crearse un grupo sin idName") {
		};
	}

	/**
	 * @param aName
	 * daniel
	 * 11/05/2011
	 */
	public Group(String aName) {
		super(aName);
	}
	
	public Boolean hasUser(User aUser) {
		return this.users.contains(aUser);
	}
	
	public void addUser(User aUser){
		this.users.add(aUser);
	}
	
	public void removeUser(User aUser){
		this.users.remove(aUser);
	}

}
